<%@ tag %>

<%@ attribute name="title" required="false" %>
<%@ attribute name="redirectReason" required="false" %>
<%@ attribute name="user" required="false" %>
<%@ attribute name="session" required="false" %>
<%@ attribute name="noWrap" required="false" %>

<%-- taglibs --%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%@ taglib prefix="html" uri="http://struts.apache.org/tags-html" %>
		
<%-- calculate the appropriate 'base' path --%>
<c:set var="basePath">
	${pageContext.request.scheme}://${pageContext.request.serverName}:${pageContext.request.serverPort}${pageContext.request.contextPath}
</c:set>
<c:set var="servletPath">
	${pageContext.request.servletPath}
</c:set>

<base href="${basePath}/" />
		
		
			
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Community by Team 1</title>
<link rel="stylesheet" type="text/css" href="${basePath}/css/project3.css">
</head>
<div id="wrapper">
	<div id="header">
		<div class="styleHeaderTitle">
			Another Student Organization
		</div>
		<div class="styleHeaderSubTitle">
			The Community Project<br/>
			A Team 1 Production
		</div>
		<div class="logo">
			<%--<a href="Forward.do?loc=main">--%>
				<img border="0" src="${basePath}/img/logo.JPG" width="220" height="110">
			<%--</a>--%>
		</div>
	</div>
	<c:choose>
		<c:when test="${noWrap=='true'}">
			<div id="contentFull">
				<jsp:doBody/>
			</div>
		</c:when>
		<c:otherwise>
			<div id="contentPanelContainer">
				<c:choose>
					<c:when test="${AUTH_USER != null}">
						<div id="content">
							<jsp:doBody/>
						</div>
					</c:when>
					<c:otherwise>
						<div id="content">
							You must be logged in to access this page.  <html:link action="/Home">Click here</html:link> to go to the login page.
						</div>
					</c:otherwise>
				</c:choose>
				<div id="nav">
					<ul class="glossymenu">
						<c:if test="${AUTH_USER != null}">
							<div class="user">${AUTH_USER.username}  (<html:link action="/Logout.do">Logout</html:link>)</div>
							<li><html:link action="/Forward.do?loc=main">Community Main Page</html:link></li><br/>
							<div class="styleNavHeader">My Account Controls</div>
							<li><html:link action="/Forward.do?loc=editProfile">Edit My Profile</html:link></li>
							<li><html:link action="/Forward.do?loc=viewProfile&objKeyId=${AUTH_USER.keyId}">View My Profile</html:link></li>
							<li><html:link action="/Forward.do?loc=searchProfile">Search Profiles</html:link></li>
							<li><html:link action="/Forward.do?loc=requestAnnouncement">Request An Announcement or Event</html:link></li>
							<li><html:link action="/Forward.do?loc=requestEmail">Request A Group Email</html:link></li>
							<br/>
							<c:if test="${PERMISSIONS == 'admin'}">
								<div class="styleNavHeader">Admin Account</div>
								<li><html:link action="/Forward.do?loc=searchUsers">Search Users</html:link></li>
								<li><html:link action="/Forward.do?loc=manage">Manage Events and Announcements</html:link></li>
								<%--<li><html:link action="/Forward.do?loc=createUser">Create User</html:link></li>--%>
								<li><html:link action="/Forward.do?loc=createAnnouncement">Create an Announcement or Event</html:link></li>
								<li><html:link action="/Forward.do?loc=editEmail">Create A Group Email</html:link></li>
								<li><html:link action="/Forward.do?loc=approve">Approve Requests</html:link></li>
							</c:if>
						</c:if>
					</ul>
				</div>
				
			</div>
		</c:otherwise>
	</c:choose>
	<div id="footer">
		<div class="footertext">&copy; 2008 Community. Team 1 Productions. All Rights Reserved.</div><br/>
		<%--<a href="Forward.do?loc=main"><span>Community</span></a>--%>
	</div>
</div>
</body>
</html>	